<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:output method='xml'
								indent="yes"
								omit-xml-declaration="yes"
								doctype-public = "-//W3C//DTD XHTML 1.0 Strict//EN"
								doctype-system = "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
								/>

<!-- includes -->
<xsl:include href="admin_template.xsl"/>

<!-- parameters -->
<xsl:param name="_user_level"/>
<xsl:param name="_user_logged_in"/>
<xsl:param name="realname"/>
<xsl:param name="lastlogin"/>

<xsl:param name="_curr_year"/>
<xsl:param name="_prev_year"/>
<xsl:param name="_next_year"/>

<xsl:param name="_photo_update"/>


<xsl:template match="/">
<html>
<!-- html head -->
<xsl:call-template name="admin_head">
<xsl:with-param name="_title">Manage photos</xsl:with-param>
</xsl:call-template>


<body id="admin_body">
	<xsl:if test="($_user_logged_in)!='false'">
		<!-- menubar -->
		<xsl:call-template name="admin_menu"/>

		<!-- content -->
		<div id="admin_content_div">
			<div id="admin_content_filter_div">
				<a href="index.php?op=manage&amp;displayall=true">Display all entries</a>
				<br/>

				<h4>Filter by tag</h4>
				<xsl:for-each select="root/tags/tag">
					<a>
						<xsl:attribute name="href">index.php?op=manage&amp;tag=<xsl:value-of select="text"/></xsl:attribute>
						<xsl:value-of select="text"/>
					</a>
				</xsl:for-each>
			</div>

			<div id="admin_content_entries_div">
				<!-- photos -->
				<xsl:for-each select="root/entries/entry">
					<div id="admin_content_entry_div">
						<xsl:value-of select="date"/>
						<br/>
						<img id="admin_little_img">
														<xsl:attribute name="src">index.php?op=thumb&amp;rat=0.25&amp;id=<xsl:value-of select="id"/></xsl:attribute>
						</img>
						<br/>
						<a><xsl:attribute name="href">index.php?op=update&amp;id=<xsl:value-of select="id"/></xsl:attribute>Update</a>
						<br/>
						<a><xsl:attribute name="href">index.php?op=delete&amp;id=<xsl:value-of select="id"/></xsl:attribute>Delete</a>
					</div>
				</xsl:for-each>
			</div>
		</div>
	</xsl:if>
	<xsl:if test= "($_user_logged_in)!='true'">
		<h3>Permission forbidden. Not authenticated.</h3>
		<a>
			<xsl:attribute name="href">index.php?op=auth</xsl:attribute><strong>Log in </strong>
		</a>
	</xsl:if>

</body>
</html>
</xsl:template>

</xsl:stylesheet>
